import 'package:get/get.dart';
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
import 'package:search_people/utils/component/selection/model.dart';

class SelectionState {
  List<SelectionModel> list = [];
  int firstIndex = 0;
  int? secondIndex = 0;
  int? thirdIndex;
  Map<int, List<SectionIndex>> selectedIndexs = {};

  Function(Map<int, List<SectionIndex>> indexs)? onSelected;

  RefreshController? rc;
  int pageIndex = 0;
  int pageSize = 50;
}

class SectionIndex {
  int index = 0;
  String name = '';
  String val = '';
  List<SectionIndex> idxs = [];
  @override
  String toString() {
    return {
      'index': index,
      'name': name,
      'val': val,
      'idxs': idxs.map((e) => e.toString()),
    }.toString();
  }
}
